package com.simulation.web.domain;

import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

@Data
public class TechCollection {
	/** 合集ID，主键，自增 */
	private Long id;
	/** 项目标题 */
	private String title;
	/** 合集简介 */
	private String content;
	/** 封面图片路径或URL */
	private String coverImage;
	/** 用户ID */
	private Long userId;
	/** 场景资源路径 */
	private String scene;
	/** 代码资源路径 */
	private String code;
	/** 图文资源路径 */
	private String imageText;
	/** 收费 */
	private BigDecimal cost;
	/** 源合集id */
	private Integer source;
	/** 创建时间 */
	private Date createTime;
	/** 合集状态，draft-草稿，published-已发布，deleted-标记为删除，private-仅自己可见，默认draft */
	private String status;
	/** 浏览量，初始为0 */
	private Integer viewCount;
	/** 点赞数，初始为0 */
	private Integer favoriteCount;
	/** 评论数，初始为0 */
	private Integer commentCount;
	/** 关注数，初始为0 */
	private Integer followCount;
	/** 发布时间，默认当前时间 */
	private Date publishTime;
	/** 更新时间，自动更新 */
	private Date updateTime;

	@Override
    public boolean equals(Object o) {
        if (this == o) { return true; }
        if (o == null || getClass() != o.getClass()) {return false;}
        TechCollection that = (TechCollection) o;
        return id.equals(that.id);
    }

    @Override
    public int hashCode() {
        return java.util.Objects.hash(id);
    }
    
    @Override
    public String toString() {
        return "TechCollection{" +
				"id=" + id +
						",content='" + content + "'" + 
						",coverImage='" + coverImage + "'" + 
						",userId='" + userId + "'" + 
						",scene='" + scene + "'" + 
						",code='" + code + "'" + 
						",imageText='" + imageText + "'" + 
						",cost='" + cost + "'" + 
						",source='" + source + "'" + 
		                '}';
    }
	
}